﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;//引入命名空间System.Collections

namespace _4_11
{
    public partial class _default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                ArrayList arrls = new ArrayList();
                arrls.Add("北京");
                arrls.Add("河北");
                arrls.Add("吉林");
                arrls.Add("云南");
                DropDownList1.DataSource = arrls;
                DropDownList1.DataBind();
            }
        }

        protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
        {
            Response.Write("<script language=javascript>alert('你选择了" + DropDownList1.SelectedValue.ToString() + "');</script>");
        }
    }
}